package buckets.strategies;

import buckets.core.BucketsInstance;
import buckets.core.BucketState;

/**
 * Concrete implementation of BFS search algorithm.
 * 
 * @author vasek
 *
 */
public final class BFS extends BlindSearchAlgorithm {

	/**
	 * Constructor.
	 * 
	 * @param instance to be solved
	 */
	public BFS(final BucketsInstance instance) {
		super(instance);
	}

	@Override
	protected void addState(BucketState state) {
		open.addLast(state);
	}

	@Override
	protected BucketState removeState() {
		return open.removeFirst();
	}

}
